package com.mapbased.sfw.model;

import org.jboss.netty.handler.codec.http.HttpHeaders;

public class FragmentBag extends PathBag {

	protected volatile Fragment fragment;

	public Fragment getFragment() {
		return fragment;
	}

	@Override
	public void renderPath(RenderContext rc) {

	
		fragment.handleAction(rc);
		if (!rc.isRenderFinished()) {
			rc.resp.setHeader(HttpHeaders.Names.CONTENT_TYPE, "text/html;charset=UTF-8");
			fragment.prepareHeadables(rc);
			fragment.render(rc);
		}
		
	}

	@Override
	public long lastModified(RenderContext rc) {
		 return fragment.lastModified(rc);
	}

}
